/*
 * Title: 回文词（Palindromes）
 * Author: Yuanshun L
 * Created: 28-Sep-2021
 */
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#define MAXN 101
int main() {
    //A,B,...,Z,1,2,...,9对应的镜像词
    char s[] = "A   3  HIL JM O   2TUVWXY51SE Z  8 ";
    char buf[MAXN];
    char descriptions[4][40] = {"is not a palindrome","is a regular palindrome",
                              "is a mirrored string","is a mirrored palindrome"};
    int first=0;
    while(scanf("%s",buf)==1){
        int a=1,b=1;
        int ch;
        int len = strlen(buf);
        for(int i=0;i<len/2;i++){
            if(buf[i]!=buf[len-i-1]) a=0;
            // 镜像词
            ch = isalpha(buf[i])?s[buf[i]-'A']:s[buf[i]-'1'+26];
            if(buf[len-i-1]!=ch) b=0;
            if(!a && !b) break;
        }
        if(first)
            printf("\n");
        else
            first=1;
        printf("%s -- %s.\n",buf,descriptions[a+b*2]);
    }

    return 0;
}
